package com.yaowk.authc.listener;

import com.yaowk.authc.Kit.ApplicationKit;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @authc yaowk
 * 2017/4/29
 */
public class LoginApplicationListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        ServletContext servletContext = servletContextEvent.getServletContext();
        ApplicationKit.setServletContext(servletContext);
        servletContext.setAttribute("total", new Integer(0));
    }

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {

    }
}
